package com.chendx.store.user.controller;

import com.chendx.model.common.dtos.ResponseResult;
import com.chendx.model.user.dto.LoginDto;
import com.chendx.store.user.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by chendx on 2022/4/29.
 */
@RestController
@RequestMapping("/api/customer")
public class CustomerController {

    @Autowired
    CustomerService customerService;

    @GetMapping("/loadList")
    public ResponseResult loadUserList() {
        return customerService.loadUserList();
    }



    @GetMapping("/getNoticeCount")
    public ResponseResult getNoticeCount(String customer){
        return customerService.getNoticeCount(customer);
    }

    @PostMapping("/login")
    public ResponseResult login(@RequestBody LoginDto dto){
        return customerService.login(dto);
    }
}
